import React, { Component } from 'react';
import {StyleSheet, Text, View, TouchableOpacity, ImageBackground, Image, FlatList, StatusBar, TextInput, ScrollView, Picker} from 'react-native';
import { base } from "../../../../assets/style";
import LinearGradient from "react-native-linear-gradient";
import ReactNativePickerSelect from 'react-native-picker-select'

type Props = {};
export default class AddMiner extends Component<Props> {
    static navigationOptions = ({ navigation }) => {
        return {
            title: '添加矿机',
            headerStyle: {
            },
            headerTintColor: '#0f0f0f',
            headerBackTitle: null
        }
    }
    constructor() {
        super();
        this.state = {
            bind: true
        }
    }
    render() {
        return (
            <View style={[base.flex_1, base.bg_gray]}>
                <View style={[base.bg_white, {paddingVertical: 25, paddingHorizontal: 30}]}>
                    <View style={[base.flex_row_between, { marginVertical: 5, height: 45, width: '100%', borderRadius: 5, borderWidth: 1, borderColor: '#d2d2d2', paddingHorizontal: 15 }]}>
                        <TextInput
                            style={[base.color_gray]}
                            value={this.state.name}
                            onChangeText={(text) => this.setState({name: text})}
                            placeholder={'请输入矿机编号'}
                        />
                    </View>
                </View>
                <View style={[base.flex_1, base.flex_col_center, base.bg_gray, { paddingBottom: 30, paddingHorizontal: 15 }]}>
                    <TouchableOpacity style={{width: '100%'}}>
                        <LinearGradient
                            start={{x: 0, y: 0}}
                            end={{x: 1, y: 1}}
                            colors={['#feac1c', '#ff7506']}
                            style={{ width: '100%', height: 46, borderRadius: 23, justifyContent: 'center', alignItems: 'center' }}
                        >
                            <Text style={{color: '#fff', fontSize: 16}}>添加</Text>
                        </LinearGradient>
                    </TouchableOpacity>
                </View>
            </View>
        )
    }
}

const styles = StyleSheet.create({
});
